<?php
/* Sent to Public Domain by Arthur Wiebe */ 

$wgExtensionFunctions[] = 'wfQuizExtension_Prof_Setup';
$wgHooks['LanguageGetMagic'][] = 'wfQuizExtension_Prof_Magic';
 
function wfQuizExtension_Prof_Setup() {
        global $wgParser;
        $wgParser->setFunctionHook('professor', 'wfQuizExtension_Prof_Render');
}

function wfQuizExtension_Prof_Magic(&$magicWords, $langCode) {
        $magicWords['professor'] = array(0, 'professor');
        return true;
}

function wfQuizExtension_Prof_Render(&$parser, $prof = '') {
        $output = " '''Professor Email is: $prof'''";
        define('QUIZ_PROFESSOR', $prof);
        return $output;
}
?>
